<@_sysConfig code=code><#assign a=object/></@_sysConfig>
<@_sysConfigData code=code><#assign attribute=object/></@_sysConfigData>
<@_sysAuthorized roleIds=admin.roles urls='sysConfigData/delete,sysConfigData/save,sysConfig/add'><#assign authorizedMap=map/></@_sysAuthorized>
<form method="post" autocomplete="off" action="sysConfigData/save?callbackType=closeCurrent&navTabId=sysConfigData/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input name="id.code" type="hidden" value="${code!}" />
    <input type="hidden" name="_csrf" value="<@_csrfToken admin=true/>"/>
    <div class="formBar">
        <ul>
        <#if authorizedMap['sysConfig/add']>
            <li><a class="button" href="sysConfig/add.html?code=${code}" target="navTab" rel="sysConfig/edit"><i class="icon-edit icon-large"></i> <@t.page 'config.edit'/></a></li>
        </#if>
        <#if authorizedMap['sysConfigData/delete']>
            <li><a class="button" href="sysConfigData/delete?code=${code}&navTabId=sysConfigData/edit&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.clear_config'/>" target="ajaxTodo"><@t.page 'button.clear_config'/></a></li>
        </#if>
        <#if authorizedMap['sysConfigData/save']>
            <@_createLock itemType='config' itemId=code userId=admin.id>
                <#if object?has_content>
            <li><button type="submit" class="buttonActive" title="ctrl+s" close-url="common/unlock?itemType=config&itemId=${code!}"><@t.page 'button.save'/></button></li>
                <#else>
            <li>
                <@_sysLock userId=admin.id itemType='content' itemId=id>
                    <@_sysUser id=(object.userId)!''><#assign lockUser=object.nickName/></@_sysUser>
                <button type="button" class="buttonDisabled" title="${object.createDate}"><@t.page 'lock.message' lockUser/></button>
                </@_sysLock>
            </li>
                </#if>
            </@_createLock>
        </#if>
            <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
        </ul>
    </div>
    <div class="pageFormContent" layoutH>
        <dl class="nowrap">
            <dt><@t.page 'description'/>:</dt>
            <dd>
                ${(a.description)!}
            </dd>
        </dl>
<#include "../include_page/extendData.html"/>
<@_sysConfigFieldList code=code>
    <@extendData name='extendDataList' extendList=list extendValues=(attribute!{}) htmlSafe=true/>
</@_sysConfigFieldList>
    </div>
</form>